<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
		<html>
			<head>
				<title>购物车</title>
			</head>
			<body>
				<h1 align="center">购物车</h1>
				<xsl:for-each select="carts/cart">
				<xsl:variable name="SelectCartId" select="cartid"></xsl:variable>
				<h3 align="center">
					购物车号：<xsl:value-of select="cartid"></xsl:value-of>
					用户名：<xsl:value-of select="username"></xsl:value-of>
				</h3>
				
					<table align="center" border="1" cellpadding="10px">
						<tbody>
						<tr>
							<th>商品图片</th>
							<th>商品号</th>
							<th>商品名称</th>
							<th>商品上架时间</th>
							<th>商品价格</th>
							<th>商品描述</th>
						</tr>
					<xsl:for-each select="./product">
						<tr>
							<td>
								<xsl:element name="img">
									<xsl:attribute name="src">
										<xsl:value-of select="productimage"/>
									</xsl:attribute>
								</xsl:element>
							</td>
							<td><xsl:value-of select="productid"></xsl:value-of></td>
							<td><xsl:value-of select="productname"></xsl:value-of></td>
							<td><xsl:value-of select="producttime"></xsl:value-of></td>
							<td><xsl:value-of select="productprice"></xsl:value-of></td>
							<td><xsl:value-of select="productinfo"></xsl:value-of></td>
						</tr>				
					</xsl:for-each>
					
					</tbody>
					
				</table>
				</xsl:for-each>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>
